<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<input type="hidden" name="organization/whether_is_gaoxin_value" value="<x:out select="$xmlData/data/organization/whether_is_gaoxin_value" />"/>
<input type="hidden" name="organization/whether_industrial_base_value" value="<x:out select="$xmlData/data/organization/whether_industrial_base_value" />"/>
<input type="hidden" name="organization/whether_is_province_value" value="<x:out select="$xmlData/data/organization/whether_is_province_value" />"/>
<input type="hidden" name="proposal/contact_psn_tel" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>"/>
<input type="hidden" name="proposal/contact_psn_email" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>"/>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo" cellspacing="1">
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<tr>
		<td colspan="5" class="t_bar2">${param.title}</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目名称：</td>
		<td colspan="4"><input id="project_name" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"
		style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />" /></td>
	</tr>
	<tr>
        <td align="right">
			<span class="color_red">*</span>归口管理单位：
		</td>
		<td colspan="2">
		    <c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
		    <cpt:tree id="recomend_org" key="recommended_org" cacheable="false" className="hn_iuput_kuang required selectWidth3" readonly="true" value="${recomend_org}" label="归口管理单位"
		              showPattern="all" shieldPattern="0" onClick="initTreeValue2"></cpt:tree>
		    <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" >
		    <input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	    <td align="right" >
			<span class="color_red">*</span>申报日期：
		</td>
		<td colspan="">
			<c:set var="submit_date">
			<x:out select="$xmlData/data/proposal/submit_date" />
		</c:set>
			<cpt:date id="submit_date" value="${submit_date }"
					  className="required date" label="申报日期"
					  name="proposal/submit_date"></cpt:date>
		</td>
	</tr>
	<tr>
		<td align="right" rowspan="2">
			<span class="color_red" >*</span>项目联系人：
		</td>
		<td align="right">
			姓名：
		</td>
		<td colspan="">
			<input id="linkman_name" name="proposal/linkman_name" label="项目联系人-->姓名" type="text" required class="input_css required maxlength:30"
                   style="" maxlength="30"
		  value="<x:out select="$xmlData/data/proposal/linkman_name" />" />
		</td>
		<td align="right">
			身份证号码：
		</td>
		<td>
			<input id="linkman_card_code" name="proposal/linkman_card_code" label="项目联系人-->身份证号码" type="text" required class="input_css required maxlength:30 idCard"
				   style="" maxlength="30"
				   value="<x:out select="$xmlData/data/proposal/linkman_card_code" />" />

		</td>
	</tr>
	<tr>
		<td align="right">
			手机：
		</td>
		<td colspan="">
			<input id="linkman_phone" name="proposal/linkman_phone" label="项目联系人-->手机" type="text" required class="input_css required mobile " maxlength="30"
				   onfocus="InitInput.setNumber(this,11,0,0);"  value="<x:out select="$xmlData/data/proposal/linkman_phone" />" />
		</td>
		<td align="right">
			联系地址：
		</td>
		<td colspan="">
			<input id="linkman_address" name="proposal/linkman_address" label="项目联系人-->联系地址" type="text" required class="input_css required "
				   maxlength="100"     value="<x:out select="$xmlData/data/proposal/linkman_address" />" />
		</td>
	</tr>
	<%--<tr>
		<td align="right" rowspan="3">
			项目负责人：
		</td>
		<td align="right">
			姓名：
		</td>
		<td>
		    <span name="zh_persons/zh_person/basic_info/zh_name">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" />
			</span>
		</td>
		<td align="right">
			身份证号码：
		</td>
		<td>
			<span name="zh_persons/zh_person/basic_info/card_code">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/card_code" />
			</span>

		</td>
	</tr>
	<tr>
		<td align="right">
			手机：
		</td>
		<td>
			<span name="zh_persons/zh_person/contact/mobile">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />
			</span>

		</td>
		<td align="right">
			联系地址：
		</td>
		<td>
			<span name="zh_persons/zh_person/basic_info/address">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/address" />
			</span>

		</td>
	</tr>
    <tr>
        <td align="right">
            电子邮箱：
        </td>
        <td>
			<span name="proposal/fzr_email">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" />
			</span>
        </td>
        <td align="right">
            联系电话：
        </td>
        <td>
			<span name="proposal/fzr_tel">
				<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />
			</span>

        </td>
    </tr>--%>

	<tr>
		<td align="right" rowspan="5">
			<span class="color_red">*</span>维权概况：
		</td>
		<td align="right">
			专利名称：
		</td>
		<td colspan="">

			<input  name="proposal/patent_name" label="维权概况-->专利名称" type="text" required class="input_css required maxlength:100"
				   style="" maxlength="100"
				   value="<x:out select="$xmlData/data/proposal/patent_name" />" />
		</td>
		<td align="right">
			专利号：
		</td>
		<td colspan="">
			<input id="" name="proposal/patent_number" label="维权概况-->专利号" type="text" required class="input_css required  maxlength:18"
				   maxlength="18"    value="<x:out select="$xmlData/data/proposal/patent_number" />" />
		</td>
	</tr>
	<tr>
		<td align="right">
			授权公告日：
		</td>
		<td colspan="3">
			<c:set var="grant_authorization_date">
				<x:out select="$xmlData/data/proposal/grant_authorization_date" />
			</c:set>
			<cpt:date id="grant_authorization_date" name="proposal/grant_authorization_date" value="${grant_authorization_date}" className="required date" label="维权概况-->授权公告日" ></cpt:date>
		</td>
	</tr>
	<tr>
		<td align="right">
			市（县）补助金额（万元）：
		</td>

		<td colspan="">
			<input id="city_apply_money" name="proposal/project_info/city_apply_money"
				   label="维权概况-->市（县）补助金额" type="text" required class="required" style="text-align:right"
				   value="<x:out select="$xmlData/data/proposal/project_info/city_apply_money" />"
				   onfocus="InitInput.setNumber(this,9,2,2)" />
		</td>
		<td align="right">
			申请省补助金额（万元）：
		</td>

		<td colspan="">
			<input id="pro_apply_money" name="proposal/project_info/pro_apply_money"
				   label="维权概况-->申请省补助金额" type="text" required class="required" style="text-align:right"
				   value="<x:out select="$xmlData/data/proposal/project_info/pro_apply_money" />"
				   onfocus="InitInput.setNumber(this,9,2,2)" />
		</td>
	</tr>
	<tr>
		<td align="right">
			维权类型：
		</td>
		<td colspan="3">

			<c:set var="rights_protection_type"><x:out select="$xmlData/data/proposal/rights_protection_type_value" /></c:set>
			<cpt:checkbox key="rights_protection_type" name="rights_protection_type" repeatColumn="3" ></cpt:checkbox>
			<input type="hidden" name="proposal/rights_protection_type_value" class="required"  value="${rights_protection_type}" label="维权概况-->维权类型">
			<input type="hidden" name="proposal/rights_protection_type_name" value="<x:out select="$xmlData/data/proposal/rights_protection_type_name" />">
		</td>

	</tr>

	<tr>
		<td align="right">
			案情概述（包括法律事实、处理过程、处理结果、费用支出等，1000字以内）：
		</td>
		<td colspan="3">
			<textarea rows="4" style="width: 98%;"  class="input_textarea required  maxlength:1000"   name='proposal/goal/summary1'  label="维权概况-->案情概述"><x:out select="$xmlData/data/proposal/goal/summary1"/></textarea>
			<input type='hidden' name='proposal/goal/summary1_hidden' id='proposal/goal/summary1_hidden' value=''>
		</td>

	</tr>


	</table>


<br />
<script type="text/javascript">
function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}

 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
 }
//合计
function autoCalFund(tabid, endName, targetId) {

	var num = 0.00;
	$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
			function() {
				if ($(this).val() == '' || $(this).val() == undefined) {
					return;
				}
				num = num * 10000 + parseFloat($(this).val()) * 10000;
				num = (num / 10000).toFixed(4);
			});
        $("#" + targetId).val(formatNumberAutoOther(num.toString(), 9, 4, 2));
}


/* 	if(targetId == "yiqibuzhu_sum"){
		var num = 0.00;
		$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
				function() {
				    if ($(this).val() == '' || $(this).val() == undefined) {
						return;
						}
						num = num +1;
			   		});
				$("#" + targetId).val(num);}
	else if(targetId == "shiyong_time_sum"){
					var num = 0.00;
					$("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
						function() {
						    if ($(this).val() == '' || $(this).val() == undefined) {
								return;
								}
								num = num + parseFloat($(this).val());
					   		});
						$("#" + targetId).val(num);
				}
	else if(targetId == "chuzhu_cost_sum"){ */



	function initTreeValueTeamPerson(treeId, treeNode) {
		//针对单位性质
		if ((treeNode && treeNode.isParent)) {
			scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_code'],[id$='" + treeId
									+ "_code']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val("");
			return false;
		}
		var str = treeNode.name.split("-")[0];
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);
		$("#" + treeId).val(str);
		initTreeValue2CallBack();
	}

	function setZhTitle(obj) {
		$("#intro_zh_title").text($(obj).val());
	}
	function localInitTreeValue(treeId, treeNode) {
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			return false;
		}

		var showName = "";
		var parentId = "";
		if (treeNode != null && treeNode.level == 1) {//选择二级
			str = obj.name + "-" + str;
			//obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[str.split("_").length - 1]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					treeNode.name.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val(treeNode.id);
		} else if (treeNode != null && treeNode.level == 2) {//选择三级
			str = obj.name + "-" + str;
			obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.parentNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[1].split("-")[0]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					str.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val(treeNode.id);
		} else {
			$("#" + treeId).val(str);
			$("#" + treeId).parents("tr").find("[name$='domain_value']")
					.val("");
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val("");
			$("#" + treeId).parents("tr").find("[name$='domain_name']")
					.text("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
							+ "_all_name']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
							+ "_all_value']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
									+ "_name']").val(str);
		}

	}
	function setEmptyValueForTree(id) {
		$("#" + id).parents("tr").find("[name$='domain_value']").val("");
		$("#" + id).parents("tr").find("[name$='subject_no']").val("");
		$("#" + id).parents("tr").find("[name$='domain_name']").text("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_name'],[id$='" + id + "_all_name']")
				.val("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_value'],[id$='" + id + "_all_value']")
				.val("");
		$("#" + id).val("");
		$("#" + id + "_hideId").val("");
		$("#" + id + "_hideName").val("");
		$("#" + id + "_code").val("");
		$("#" + id + "_value").val("");
		$("#" + id + "_name").val("");
		$(
				"#" + id + ",[name$='/" + id + "_code']" + ",[name$='/" + id
						+ "_name'],[name$='/" + id + "_value']").val("");
	}
	function showText(obj) {

		if (($(obj).attr("checked") == "checked")) {
			$("#" + $(obj).attr("name") + "_other").css("display", "");
			$("#" + $(obj).attr("name") + "_other").addClass("required");
		} else {
			$("#" + $(obj).attr("name") + "_other").css("display", "none");
			$("#" + $(obj).attr("name") + "_other").val("");
			$("#" + $(obj).attr("name") + "_other").removeClass("required");
		}
	}
	$(document).ready(function() {
		$('#basicInfo tr:even').addClass("li_2");
		$('#basicInfo tr:odd').addClass("li_1");

	});
	function count() {
		$("#eq_table1 tr:gt(1)").each(function() {
			var price_each=$(this).find("td:eq(4) input").val();
			var num=$(this).find("td:eq(5) input").val();
			$(this).find("td:eq(6) input").val(formatVal(price_each*num));
		});
		$("#eq_table2 tr:gt(1)").each(function() {
			var price_each=$(this).find("td:eq(4) input").val();
			var num=$(this).find("td:eq(5) input").val();
			$(this).find("td:eq(6) input").val(formatVal(price_each*num));
		});
	}
	function formatVal(count) {
		if (!$.isNumeric(count))
		count = "0";
		count = ((parseFloat(count) * 10000) / 10000).toFixed(4);
		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
		return count;
	}
	function checkTab2() {
		if($("#eq_table2 tr").length>2){
	    	$("#eq_tab2_val").val("1");
	    }else{
	    	$("#eq_tab2_val").val("");
	    }
	}


</script>
